/**
 * Title 组件用法：
 * 组件引用方法：import XXX from '@/pages/Dashboard/common/Tilte';
 * 参数：
 * {string} props.title 'xxx'
 * {boolean} props.isMore
 * {function} props.goMore - 查看更多回调函数
 */
import React from 'react'
import { DoubleRightOutlined } from '@ant-design/icons'
import './index.less'

const Title = (props) => {
  return (
    <div className={`common-quorum-title ${props.className || ''}`}>
      <span className="title-symbol" />
      <span className="text">{props.title}</span>
      {
        props.isMore
          ? <span className="more-btn" onClick={() => props.goMore()}>查看更多<DoubleRightOutlined /></span>
          : null
      }

    </div>
  )
}
Title.defaultProps = {
  isMore: false,
}

export default Title
